/**
 * 映射类型：基于旧类型创建新类型，减少重复，提升开发效率
 * 
 * 映射类型是从索引签名类型衍生出来的
 * 
 */
type NewProps='x'|'y'|'z'

type ObjProps={x:number,y:number,z:number}

type ObjProps1={[key:string]:number}

type ObjProps2={[key in NewProps]:number}

let obj1:ObjProps={x:10,y:20,z:30}

let obj2:ObjProps2={x:10,y:20,z:40}



